package com.hup.minicontroller.common.model.dto;

import com.hup.minicontroller.common.bluetooth.model.BaseBtDataPacket;
import com.hup.minicontroller.common.constant.NetConstant.DataType;
import com.hup.minicontroller.common.netty.model.BaseDataPacket;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 屏幕图像数据;
 * .来源 android.graphics.Bitmap#compress(android.graphics.Bitmap.CompressFormat, int, java.io.OutputStream)
 */
@Data
@NoArgsConstructor
public class ScreenDataResponse implements BaseDataPacket, BaseBtDataPacket {

    private byte[] data;

    public ScreenDataResponse(byte[] data) {
        this.data = data;
    }

    @Override
    public int getType() {
        return DataType.SCREEN_DATA;
    }

    @Override
    public String toString() {
        return "ScreenDataResponse{" +
                "data=" + (data == null ? null : data.length) +
                '}';
    }
}
